package com.tjoris.bpmstudio;

import java.net.MalformedURLException;
import java.net.URL;

import com.tjoris.midigateway.IMidiAction;

class BpmAction implements IMidiAction {
	private final String fID;
	private final String fName;
	private final URL fCommand;
	
	
	public BpmAction(final String id, final String name, final String command) throws MalformedURLException {
		fID = id;
		fName = name;
		fCommand = new URL("http://localhost/" + command);
	}
	
	public String getName() {
		return fName;
	}

	public String getID() {
		return fID;
	}

	public void run() {
		try {
			fCommand.getContent();
		}
		catch (final Exception e) {
			e.printStackTrace();
		}
	}
}
